﻿using UnityEngine;
using System.Collections;
using System.IO;

public class CFileMgr
{
	public bool ExistsFile( string strFileName )
	{
		string strFullPath = Application.persistentDataPath;
		strFullPath += strFileName;
		return File.Exists(strFullPath);
	}

	public FileStream OpenFile(string strFileName, FileAccess AccesType)
	{
		string strFullPath = Application.persistentDataPath;
		strFullPath += strFileName;
        Debug.Log("OpenFile : " + strFullPath.ToString());
		return File.Open(strFullPath, FileMode.OpenOrCreate, AccesType);
	}

    public void CloseFile(FileStream fstream)
    {
        if (null != fstream)
        {
            fstream.Close();
        }
    }
}